{% extends "blog/base.html" %}
{% block extrahead %}
    <script type="text/javascript" src="/site_media/js/myjs.js"></script>
    <script type="text/javascript" src="/site_media/js/tag.js"></script>
    <link href="/site_media/css/tag.css" rel="stylesheet" type="text/css" />
    <link href="/site_media/css/ui.datepicker.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/site_media/js/ui.datepicker.js"></script>
    <script type="text/javascript" src="/site_media/js/json2.js"></script>
    <script type="text/javascript">
    /* javascript demo (Firefox), require "http://www.json.org/json2.js" */

var API_URL = 'http://api2.diigo.com/bookmarks';

var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = onResponse;

function onResponse() {
  if (xmlHttp.readyState == 4) {
    /*alert(xmlHttp.responseText);*/
    alert('aaa')
  }
  alert('aabba')
}

/* GET: query bookmarks */

function queryBookmarks() {
  xmlHttp.open("GET", API_URL + "?rows=1&users=foo", true);
  xmlHttp.send(null);
}

    </script>

{% endblock %}

{% block main %} {% endblock %} 

{% block sidebar %}
<div id="sidebar">
	<div class="sideTop"></div>
    
    <div id="myInform" class="module">
        <div class="modTop"></div>
        <a href="/blog/aboutme"><h2>About Me</h2></a>
        <div class="modBody">
        <ul>
            <span style="color:#a0efa2;font-size:120%;font-weight:bold;">Welcome</span>
            <span style="font-size:90%">to My English </span>Blog!<br/>
            <span style="font-size:90%">I am </span>
            <span style="color:#f7c3cc;font-size:110%;">Lizzie</span>,
            Love <span style="color:#ccf3e7;font-size:120%;font-weight:bold;">Python</span>
            <span style="font-size:90%">and</span> 
            <span style="color:#d0d6f9;font-size:120%;font-weight:bold;">Linux</span>.
            <span style="font-size:82%">
            Still Student Now and Interested in </span>
            <span style="color:#f7aad0;font-size:100%;">Data Mining</span>
            <!-- My email: 
            <span style="color:#a0e6f7;font-size:105%;">shengyan1985</span>
            <span style="font-size:80%">at</span>
            <span style="color:#f7f9d0;font-size:100%;">gmail</span>
            <span style="font-size:80%">dot </span>com&nbsp;
            <a href="http://lizziesky.blogspot.com"><span style="font-size:90%;">My Another Blog</span></a>
            -->
            <p id="aboutme"><a href="/blog/aboutme/">&gt;&gt;</a></p>
        <ul>
        </div>
        <div class="modBottom"></div>    
    </div>
    
    <div id="time" class="module">
        <div class="modTop"></div>
        <h2>Time</h2>
        <div class="modBody">
            <!--  <input type="text" id="dateinput" value="click to show datepicker" size="10"/>
            <script type="text/javascript" charset="utf-8">
                    jQuery(function($){
                        $("#dateinput").datepicker();
                        });
            </script> -->
            <div id="date"></div>
            <script charset="utf-8" type="text/javascript">
                $('#date').datepicker(
                {
                    onSelect: function(date) 
                    { 
                    //alert('You selected ' + date);
                    //redirect("/blog/date/"+date+"/");
                    location.href="/blog/date/"+date+"/";
                    }
                });	
            </script>
        </div>
        <div class="modBottom"></div>    
    </div> 
    
    <div id="tag" class="module">
        <div class="modTop"></div>
        <h2>Tag Cloud</h2>
        <div class="modBody">
        <ul>
            {% for onetag in tags %}
                <li>
                <a class="size{{ onetag.entry_set.count }}" id="j{{ onetag.id }}" href="{{ onetag.get_absolute_url }}">{{ onetag }}
                <span class="count">[{{ onetag.entry_set.count}}]</span></a>
                </li>
            {% endfor %}
        </ul>
<!-- <div id="cloud">
	<ul class="nav">
		<li>
		    <a class="size1" href="#" id="j1">adobe</a>
			<ul style="display: block;" class="hovertip" target="j1">
				<li><a class="size-sub1" href="#">Photoshop</a></li>
				<li><a class="size-sub2" href="#">Illustrator</a></li>
				<li><a class="size-sub3" href="#">Dreamweaver</a></li>
				<li><a class="size-sub4" href="#">Fireworks</a></li>
			</ul>
		</li>
		<li>
		    <a class="size2" href="#" id="j2">Showcases</a></li>
		<li>
		    <a class="size3" href="#" id="j3">Arts</a>
			<ul style="display: block;" class="hovertip" target="j3" >
				<li><a class="size-sub1" href="#">Arts1</a></li>
				<li><a class="size-sub2" href="#">Arts2</a></li>
				<li><a class="size-sub3" href="#">Arts3</a></li>
				<li><a class="size-sub4" href="#">Arts4</a></li>
				<li><a class="size-sub2" href="#">Arts5</a></li>
			</ul>
	     </li>
		<li>
		    <a class="size4" href="#" id="j4">Better Design</a>
			<ul style="display: block;" class="hovertip" target="j4" >
				<li><a class="size-sub1" href="#">Design1</a></li>
				<li><a class="size-sub2" href="#">Design2</a></li>
				<li><a class="size-sub3" href="#">Design3</a></li>
				<li><a class="size-sub4" href="#">Design4</a></li>
			</ul>
	    </li>
		<li><a class="size5" href="#">Blogging</a></li>
		<li><a class="size1" href="#" id="j5">Ajax</a>
			<ul style="display: block;" class="hovertip" target="j5" >
				<li><a class="size-sub1" href="#">Jquery</a></li>
				<li><a class="size-sub2" href="#">Script.aculo.us</a></li>
				<li><a class="size-sub3" href="#">Mootools</a></li>
				<li><a class="size-sub4" href="#">Dojo</a></li>
				<li><a class="size-sub2" href="#">Prototype</a></li>
			</ul>
		</li>
	</ul>
</div> -->

        </div>
        <div class="modBottom"></div>    
    </div>    

    <div id="rss" class="module">
        <div class="modTop"></div>
        <h2>RSS</h2>
        <div class="modBody">
        <ul>
            <a href="/blog/feeds/rss/"><img border="0" title="rss_img" alt="rss_img" src="/site_media/img/rss.gif">&nbsp;</img></a><br/>
            <a href="http://fusion.google.com/add?feedurl=http://www.lizziesky.cn/blog/feeds/rss/"><img border="0" title="rss_google" alt="rss_google" src="/site_media/img/rss_google.gif">&nbsp;</img></a><br/>
            <a href="http://www.zhuaxia.com/add_channel.php?url=http://www.lizziesky.cn/blog/feeds/rss/"><img border="0" title="rss_zhuaxia" alt="rss_zhuaxia" src="/site_media/img/rss_zhuaxia.gif">&nbsp;</img></a><br/>
            <a href="http://www.xianguo.com/subscribe.php?url=http://www.lizziesky.cn/blog/feeds/rss/"><img border="0" title="rss_xianguo" alt="rss_xianguo" src="/site_media/img/rss_xianguo.jpg">&nbsp;</img></a>
        </ul>
        </div>
        <div class="modBottom"></div>    
    </div> 
        
    <div id="links" class="module">
        <div class="modTop"></div>
        <h2>Friends' Links</h2>
        <div class="modBody">
        <ul>
            {% for onelink in link_list %}
                <li class="friendli">
                <a href="{{ onelink.website }}">{{ onelink.name }}
                ---{{ onelink.description }}</a>
                </li>
            {% endfor %}
        </ul>
        </div>
        <div class="modBottom"></div>    
    </div> 

    <div id="map" class="module">
        <div class="modTop"></div>
        <h2>Map</h2>
        <div class="modBody">
        <ul>
            <p>Map...</p>
        </ul>
        </div>
        <div class="modBottom"></div>    
    </div> 
        
    <div class="sideBottom"/></div>
</div>

{% endblock %}



{% block centsidebar %}
<div id="sidebar">
	<div class="sideTop"></div>

    <div id="search" class="module">
        <div class="modTop"></div>
        <h2>Search</h2>
        <div class="modBody">
            <form name="SearchForm" method="get" action="/blog/search/">
                <input type="text" name="keywords" class="textField" />
                <input type="submit" class="button" value="ok" />
                <!-- <input type="hidden" name="b" value="1548647"/>
                <input type="hidden" name="dir" value="oneblog"/> -->
                <div class="clear"></div>
            </form>
        </div>
        <div class="modBottom"></div>
    </div>
        
    <div id="nPosts" class="module">
        <div class="modTop"></div>
        <h2>Latest Entries</h2><!-- ??Popular -->
        <div class="modBody">
            <ul>
                {% for ent in all_entry_list|slice:":5" %}
                    <li>
                    <!-- [{{ ent.pub_date|date:" Y/m/d" }}]&nbsp;&nbsp; -->
                    <a href="{{ ent.get_absolute_url }}">{{ ent.title }}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>
        <div class="modBottom"></div>
    </div>
    
    <div id="nComments" class="module">
        <div class="modTop"></div>
        <h2>Latest Comments</h2>
        <div class="modBody">
            <ul>
                {% for com in comment_list|slice:":5" %}
                    <li>
                    [{{ com.date|date:" Y/m/d H:m"}}]<br/>&nbsp;&nbsp;
                    {% if com.website %}
                        <a href="http://{{ com.website }}">{{ com.author }}</a> says:
                    {% else %}
                        {{ com.author }} says:
                    {% endif %}
                    <a href="{{ com.get_absolute_url }}">{{ com.body|truncatewords:"30" }}</a>
                    </li>
                {% endfor %}
            </ul>            
        </div>
        <div class="modBottom"></div>
    </div>
    
    <div class="sideBottom"/></div>
</div>

{% endblock %}
